package cn.jly.spring.boot.cloud.component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author lanyangji
 * @description 自定义spring的监听器
 * @date 2020/11/24 上午 10:48
 */
@Slf4j
@Component
public class MySpringListener implements ApplicationListener<ApplicationEvent> {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
      log.info("MySpringListener.onApplicationEvent -> " + event);
    }
}
